package com.sddr.config.event;

import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;

/**
 * @author 山顶洞人郑某
 * @className ConfigEventPush.java 事件发布者
 * 先监听SpringBoot启动事件（ApplicationStartedEvent），项目启动后，ApplicationContext()，并发布事件
 * @date 2025 07 13
 */
public class ConfigEventPush implements ApplicationListener<ApplicationStartedEvent> {
    @Override
    public void onApplicationEvent(ApplicationStartedEvent event) {
        event.getApplicationContext().publishEvent(new ConfigEvent(this));
    }
}
